//
// Created by HP on 2024/5/8.
//

#ifndef AURORA_ST_AURORA_INFO_H
#define AURORA_ST_AURORA_INFO_H

#include "common_inc.h"
#include "lcd_driver.h"
#include "aurora_font.h"
#include "aurora_label.h"


class Aurora_Info {
public:
    Aurora_Info(LCD_Driver *lcd_s,Aurora_Font *font_s);
    ~Aurora_Info();
    void Init();

    void updateDetail(Aurora_FOC2UI_Detail detail);

    void updateMode(uint8_t L,uint8_t R);

    void send_halt_motor();
    void send_recovery_motor();

private:
    Aurora_Label title_label;    //标题
    Aurora_Label leftM_label;    //左电机
    Aurora_Label rightM_label;   //右电机


    Aurora_Label Lmode_label;    //电机运行模式
    Aurora_Label Rmode_label;    //电机运行模式

    Aurora_Label LUq_label;      //电机Uq
    Aurora_Label RUq_label;      //电机Uq

    Aurora_Label LCurrent_label; //电机电流
    Aurora_Label RCurrent_label; //电机电流

    Aurora_Label LSpeed_label;   //电机速度
    Aurora_Label RSpeed_label;   //电机速度

    Aurora_Label LPostion_label; //电机位置
    Aurora_Label RPostion_label; //电机位置

    Aurora_Label LArrow_label; //箭头
    Aurora_Label RArrow_label; //箭头


    Aurora_Label LmodeValue_label; //模式
    Aurora_Label RmodeValue_label; //模式

    Aurora_Label LUqValue_label; //Uq
    Aurora_Label RUqValue_label; //Uq

    Aurora_Label LCurrentValue_label; //电流
    Aurora_Label RCurrentValue_label; //电流


    Aurora_Label LSpeedValue_label; //速度
    Aurora_Label RSpeedValue_label; //速度

    Aurora_Label LPositionValue_label; //速度
    Aurora_Label RPositionValue_label; //速度

    Aurora_Label LDesireValue_label; //期望值
    Aurora_Label RDesireValue_label; //期望值


    uint8_t Lmode;
    uint8_t Rmode;
private:
    LCD_Driver *_lcd;
    Aurora_Font *_font;
};


#endif //AURORA_ST_AURORA_INFO_H
